package com.controller.secController;

import com.service.OrderService;
import com.SpringContextUtil;
import com.dao.model.Product;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;

@Controller
public class CartController implements Runnable {
    Logger logger = Logger.getLogger(this.getClass());

    private String orderbh;

    private String account;

    private Product product;

    public String getOrderbh() {
        return orderbh;
    }

    public void setOrderbh(String orderbh) {
        this.orderbh = orderbh;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public Product getProduct() {
        return product;
    }

    public void setProduct(Product product) {
        this.product = product;
    }

    public void run() {
        logger.info("订单相关状态处理开始...");
        OrderService service = (OrderService) SpringContextUtil.getBean("orderService");
        service.updateOrder(orderbh,account,product);
        logger.info("订单相关状态处理结束...");

    }
}
